import csv

def set_player(player):
    with open('player.csv','r',encoding='utf-8') as f:
        reader = csv.DictReader(f)
        for r in reader:
            if r['job'] == player.job:
                player.attack = r['attact']
                player.defense = r['defense']
                player.agile = r['agile']
                player.crite_rate = r['crite_rate']
                player.crite_damage = r['crite_damage']

def set_enemy(enemy):
    with open('player.csv','r',encoding='utf-8') as f:
        reader = csv.DictReader(f)
        for r in reader:
            if r['job'] == player.job:
                player.attack = r['attact']
                player.defense = r['defense']
                player.agile = r['agile']
                player.crite_rate = r['crite_rate']
                player.crite_damage = r['crite_damage']